package com.itheima.project.project;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.google.gson.Gson;
import com.itheima.project.*;

import java.util.List;

public class FragmentSencondRecyclerAdapter extends BaseQuickAdapter<SencondRecyclerEntity.DataBean.DatasBean, BaseViewHolder> {

    public FragmentSencondRecyclerAdapter(int layoutResId, @Nullable List<SencondRecyclerEntity.DataBean.DatasBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SencondRecyclerEntity.DataBean.DatasBean item) {
       helper.setText(R.id.tv_title_fragment_second_project_item,item.getTitle());
       helper.setText(R.id.tv_content_fragment_second_project_item,item.getDesc());
       helper.setText(R.id.tv_time_fragment_second_project_item,item.getNiceDate());
        Glide.with(mContext).load(item.getEnvelopePic()).crossFade()
                .into((ImageView) helper.getView(R.id.iv_image_fragment_second_project_item));

    }
}
